<template lang="pug">
  v-container
    v-card
      v-toolbar(color="purple darken-4" dark dense)
        v-toolbar-title 基本信息
        v-spacer
        v-toolbar-items
          v-btn(text @click="gotoEdit") 编辑
      v-form(ref="form")
        v-container
          v-row
            v-col(cols="12")
              h4.body-2 {{ Lang['name'] }}
              p.body-1.text--primary {{ val('name') }}
            v-col(cols="12")
              h4.body-2 {{ Lang['description'] }}
              p.body-1.text--primary {{ val('description') }}
            v-col(cols="12")
              h4.body-2 {{ Lang['criteria'] }}
              p.body-1.text--primary {{ val('criteria') }}
            v-col(cols="12")
              h4.body-2 {{ Lang['formula'] }}
              p.body-1.text--primary {{ val('formula') }}
            v-col(cols="12")
              h4.body-2 {{ Lang['created_at'] }}
              p.body-1.text--primary {{ val('created_at') }}

</template>

<script lang="ts">
  import Vue, {VueConstructor} from 'vue'
  import ViewFormMixin from '@/components/mixins/ViewFormMixin'
  import {mapMutations, mapState} from 'vuex'
  import {FeeFormulaLang} from '@/store/modules/types/FeeFormula'
  import get = Reflect.get

  export default (Vue as VueConstructor<Vue & {
    $refs: {}
  }>).extend({
    name: 'fee_formula_view',
    mixins: [ViewFormMixin],
    computed: {
      ...mapState("feeFormula", {entry: "feeFormula"})
    },
    components: {},
    methods: {
      ...mapMutations('feeFormula', ['resetClone', 'setActive'])
    },
    data() {
      return {
        Lang: FeeFormulaLang
      }
    }
  })
</script>